﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Example01CSharpClient.rpc;

namespace Example01CSharpClient
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {

                Console.WriteLine(new SampleClass(1860, "some string", SampleEnum.Foo));
                IMyFirstServer server = new MyFirstServerXmlRpcClientImplementation("http://localhost:1860/rpc");
                Console.WriteLine("Add returns {0}", server.Add(1, 2));
                server.SetSampleInstance(new SampleClass(1860, "some string", SampleEnum.Foo));
                Console.WriteLine("GetSampleInstance returns {0}", server.GetSampleInstance());
            }
            catch(Exception e)
            {
                Console.WriteLine(e);
            }
        }
    }
}
